//package com.jxb.filter;
//
//import org.springframework.stereotype.Component;
//
//import javax.servlet.*;
//import javax.servlet.http.HttpServletRequest;
//import java.io.IOException;
//
////@Component
//public class TokenFilter implements Filter {
//    @Override
//    public void init(FilterConfig filterConfig) throws ServletException {
//        Filter.super.init(filterConfig);
//    }
//
//    @Override
//    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
//        HttpServletRequest request = (HttpServletRequest) servletRequest;
//        request.getHeader("token");
//        String token = request.getHeader("Authorization");
//        if (token == null) {
//            System.out.println("没有权限");
//        }else {
//            //校验token
//        }
//        System.out.println("123123");
//    }
//
//    @Override
//    public void destroy() {
//        Filter.super.destroy();
//    }
//}
